package io;

import com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter;
import datamodel.Field;
import datamodel.FieldFactory;

public class SignConverter extends AbstractSingleValueConverter {

	public static String ATTRIBUTE_NAME_OF_FINAL_CHAR = "c";

	public boolean canConvert(Class clazz) {
		return clazz.equals(Field.class);
	}

	@Override
	public Object fromString(String str) {
		Field f = FieldFactory.getField();
		if (str != " ") {
			f.setValue(Integer.valueOf(str));
			
		}
		return f;
	}

}
